/*
 * Copyright © 2015 Cask Data, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

@import "../../styles/variables.less";
@import "../../styles/themes/cdap/mixins.less";
@import "../../../bower_components/bootstrap/less/mixins.less";

body.theme-cdap {
  my-breadcrumbs, my-breadcrumb {
    @media (max-width: @screen-xs-max) {
      display: none;
    }
    @media (min-width: @screen-sm-min) {
      background-color: white;
      border-bottom: 1px solid @panel-default-border;
      position: absolute;
      top: 50px;
      right: 0;
      left: 0;
      height: 40px;
      line-height: 40px;
      .box-shadow(5px 0 10px rgba(0,0,0,0.5));
      .crumbs {
        height: 40px;
        margin-left: 235px;
      }
      .breadcrumb {
        background-color: transparent;
        font-weight: 500;
        height: 40px;
        white-space: nowrap;
        > li {
          display: inline-block;
          height: 40px;
          position: relative;
          text-align: center;
          &:after {
            z-index: 99;
          }
          &:not(:last-child), &:not(:only-child) {
            &:before {
              content: none;
            }
            &:after {
              content: url('@{img-path}/chevron_front.png');
              height: 40px;
              top: 0;
              right: 0;
              display: inline-block;
              position: relative;
            }
          }
          &:nth-last-child(2) {
            &:after {
              content: '';
            }
          }
          &:last-child {
            background-image: url('@{img-path}/gray_chevron_body.png');
            &:before, &:after {
              background-color: white;
              height: 40px;
              top: 0;
            }
            &:before {
              content: url('@{img-path}/gray_chevron_back.png');
              display: inline-block;
              left: 0;
              padding: 0;
              position: relative;
            }
            &:after {
              content: url('@{img-path}/gray_chevron_front.png');
              right: 0;
              position: absolute;
              border-bottom: 1px solid #ddd;
            }
            span {
              color: @cdap-header;
              padding-right: 18px;
            }
          }
          a, span {
            display: inline-block;
            vertical-align: top;
          }
          a {
            color: @cdap-gray;
            padding-left: 11px;
            &:hover, &:focus {
              text-decoration: none;
            }
          }
          &:first-child {
            a {
              padding-left: 18px;
            }
          }
          &:only-child {
            background-image: url('@{img-path}/gray_chevron_body.png');
            margin-left: 20px;
            &:before {
              background-color: transparent;
              content: '';
              width: 0.5px;
              .box-shadow(1px 0 6px rgba(1, 0, 0, 0.65));
            }
            span {
              padding-left: 11px;
            }
          }
        }
      }
    }
  }
}

